package com.service.impl;

import com.bean.SalesReturnRecord;
import com.dao.SalesReturnRecordMapper;
import com.service.SalesReturnRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service("salesReturnRecordService")
public class SalesReturnRecordServiceImpl implements SalesReturnRecordService {
    @Autowired
    private SalesReturnRecordMapper salesReturnRecordMapper;
    @Override
    public int save(SalesReturnRecord salesReturnRecord) {
        return salesReturnRecordMapper.insert(salesReturnRecord);
    }

    @Override
    public List<SalesReturnRecord> find(SalesReturnRecord salesReturnRecord) {
        return salesReturnRecordMapper.select(salesReturnRecord);
    }

    @Override
    public int count(Map<String, Object> map) {
        return salesReturnRecordMapper.selectCount(map);
    }

    @Override
    public List<SalesReturnRecord> query(Map<String, Object> map) {
        return salesReturnRecordMapper.selectByPage(map);
    }
}
